let express = require('express');
let TopicAction = require('../../action/topicAction');
let router = express.Router();
router.post('/create', function (req, res) {
    TopicAction.create(req.body).then(res.res, res.rej);
});
router.post('/praise', function (req, res) {
    TopicAction.addPraise(req.body).then(res.res, res.rej);
});
router.post('/cancelPraise', function (req, res) {
    TopicAction.deletePraise(req.body).then(res.res, res.rej);
});
router.post('/list', function (req, res) {
    TopicAction.list(req.body).then(res.res, res.rej);
});
router.post('/allList', function (req, res) {
    TopicAction.allList(req.body).then(res.res, res.rej);
});
router.post('/delete', function (req, res) {
    TopicAction.deleteTopic(req.body).then(res.res, res.rej);
});
module.exports = router;
